home *** CD-ROM | disk | FTP | other *** search
/ The Guided Tour of Multimedia (Second Edition) / The Guided Tour of Multimedia (Second Edition).iso / trials / qtw111 / samples / mathglue.asm < prev    next >
Assembly Source File  |  1993-03-11  |  2KB  |  57 lines

  1. ; ---------------------------------------------------------------------
  2. ;
  3. ; MathGlue.Asm - Math Components App Glue - QuickTime for Windows
  4. ;
  5. ;                Version 1.0
  6. ;
  7. ;                (c) 1988-1993 Apple Computer, Inc. All Rights Reserved.
  8. ;
  9. ; ---------------------------------------------------------------------
  10.  
  11.  
  12.         .MODEL SMALL, C
  13.         .386
  14.  
  15.         .DATA
  16. EXTERN   lpfnQTComponentManager:DWORD  ; pointer to CompMgr EntryPoint
  17.  
  18.  
  19.         .CODE
  20.  
  21.          ASSUME DS: DGROUP
  22.  
  23.  
  24. ;///////////////////////////////////////////////////////////////////////////
  25. ; ComponentFunc Macro
  26. ;   Define code used for each glue function
  27.  
  28. ComponentFunc MACRO sel:req, name:req
  29. name  PROC FAR                         ; define as public far function
  30.    push  ds                            ; save current DS
  31.    mov   bx, sel                       ; load function selector
  32.    mov   ax, 2                         ; generic component ID
  33.    call  DWORD PTR lpfnQTComponentManager ; call the Component Manager
  34.    pop   ds                            ; restore DS
  35.    ret                                 ; far return
  36. name  ENDP
  37.    EVEN                                ; make sure aligned on even boundary
  38. ENDM
  39.  
  40.  
  41. ;///////////////////////////////////////////////////////////////////////////
  42. ; Add Glue Functions
  43. ;   Including functions expands macro into function definitions
  44.  
  45.    EVEN                                ; make sure aligned on even boundary
  46.    INCLUDE addfs.inc
  47.  
  48.  
  49. ;///////////////////////////////////////////////////////////////////////////
  50. ; Sum Glue Functions
  51. ;   Including functions expands macro into function definitions
  52.  
  53.    EVEN                                ; make sure aligned on even boundary
  54.    INCLUDE sumfs.inc
  55.  
  56. END
  57.